//app.js
App({
  onLaunch: function () {
     //获取设备信息
     wx.getSystemInfo({
       success:res=>{
         console.log(res);
         var statusHeight=res.statusBarHeight
         ,isIOS=res.system.indexOf('IOS')>-1
         ,navHeight;
         if(isIOS){
           navHeight=48;
         }else{
           navHeight=44;
         }
          this.globalData.status=statusHeight;
          this.globalData.navHeight=navHeight;
       }
     })
  },
  globalData: {
    status:'',
    navHeight:''
  }
})